package com.ruoyi.warehouse.service.impl;

import java.util.List;

import com.ruoyi.warehouse.service.IDrugWarehouseStockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.warehouse.mapper.DrugWarehouseOperateMapper;
import com.ruoyi.warehouse.domain.DrugWarehouseOperate;
import com.ruoyi.warehouse.service.IDrugWarehouseOperateService;

/**
 * 药库操作Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-22
 */
@Service
public class DrugWarehouseOperateServiceImpl implements IDrugWarehouseOperateService 
{
    @Autowired
    private DrugWarehouseOperateMapper drugWarehouseOperateMapper;
    @Autowired
    private IDrugWarehouseStockService drugWarehouseStockService;

    /**
     * 查询药库操作
     * 
     * @param operateId 药库操作主键
     * @return 药库操作
     */
    @Override
    public DrugWarehouseOperate selectDrugWarehouseOperateByOperateId(Long operateId)
    {
        return drugWarehouseOperateMapper.selectDrugWarehouseOperateByOperateId(operateId);
    }

    /**
     * 查询药库操作列表
     * 
     * @param drugWarehouseOperate 药库操作
     * @return 药库操作
     */
    @Override
    public List<DrugWarehouseOperate> selectDrugWarehouseOperateList(DrugWarehouseOperate drugWarehouseOperate)
    {
        return drugWarehouseOperateMapper.selectDrugWarehouseOperateList(drugWarehouseOperate);
    }

    /**
     * 新增药库操作
     * 
     * @param drugWarehouseOperate 药库操作
     * @return 结果
     */
    @Override
    public int insertDrugWarehouseOperate(DrugWarehouseOperate drugWarehouseOperate)
    {
        return drugWarehouseOperateMapper.insertDrugWarehouseOperate(drugWarehouseOperate);
    }

    /**
     * 修改药库操作
     * 
     * @param drugWarehouseOperate 药库操作
     * @return 结果
     */
    @Override
    public int updateDrugWarehouseOperate(DrugWarehouseOperate drugWarehouseOperate)
    {

        return drugWarehouseOperateMapper.updateDrugWarehouseOperate(drugWarehouseOperate);
    }

    /**
     * 批量删除药库操作
     * 
     * @param operateIds 需要删除的药库操作主键
     * @return 结果
     */
    @Override
    public int deleteDrugWarehouseOperateByOperateIds(Long[] operateIds)
    {
        return drugWarehouseOperateMapper.deleteDrugWarehouseOperateByOperateIds(operateIds);
    }

    /**
     * 删除药库操作信息
     * 
     * @param operateId 药库操作主键
     * @return 结果
     */
    @Override
    public int deleteDrugWarehouseOperateByOperateId(Long operateId)
    {
        return drugWarehouseOperateMapper.deleteDrugWarehouseOperateByOperateId(operateId);
    }
}
